package com.youdianda.controller;

import com.youdianda.dto.YddUserLoginDTO;
import com.youdianda.result.Result;
import com.youdianda.service.IYddUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/home/index")
public class FrontUserLoginController {

    @Autowired
    private IYddUserService iYddUserService;

    /**
     * 登录
     * @param dto
     * @return
     */
    @PostMapping("/login")
    public Result login(@RequestBody YddUserLoginDTO dto){
        return iYddUserService.frontLogin(dto);
    }


}
